package com.xyht.sca_s.student_manage_system.modules.payment.wxpay.entity;

import com.wechat.pay.java.service.partnerpayments.jsapi.model.Amount;
import com.wechat.pay.java.service.partnerpayments.jsapi.model.Payer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CallbackPayResourceEntity {
    @ApiModelProperty("子商户商户号")
    private String mchid;

    @ApiModelProperty("商户应用id")
    private String AppID;

    @ApiModelProperty("订单id")
    private String out_trade_no;

    @ApiModelProperty("微信支付订单号")
    private String transaction_id;

    @ApiModelProperty("支付类型  交易类型，枚举值：\n" +
            "JSAPI：公众号支付\n" +
            "NATIVE：扫码支付\n" +
            "APP：APP支付\n" +
            "MICROPAY：付款码支付\n" +
            "MWEB：H5支付\n" +
            "FACEPAY：刷脸支付")
    private String trade_type;

    @ApiModelProperty("交易状态，枚举值：\n" +
            "SUCCESS：支付成功\n" +
            "REFUND：转入退款\n" +
            "NOTPAY：未支付\n" +
            "CLOSED：已关闭\n" +
            "REVOKED：已撤销（付款码支付）\n" +
            "USERPAYING：用户支付中（付款码支付）\n" +
            "PAYERROR：支付失败(其他原因，如银行返回失败)")
    private String trade_state;

    @ApiModelProperty("交易状态描述")
    private String trade_state_desc;

    @ApiModelProperty("付款银行")
    //参考路径 https://pay.weixin.qq.com/docs/merchant/development/chart/bank-type.html
    private String bank_type;

    @ApiModelProperty("附加数据")
    private String attach;

    @ApiModelProperty("支付完成时间")
    private String success_time;

    @ApiModelProperty("订单金额")
    private Amount amount;

    @ApiModelProperty("支付者")
    private Payer payer;

    @ApiModelProperty("微信退款单号")
    private String refund_id;

    @ApiModelProperty("商户退款单号")
    private String out_refund_no;

    @ApiModelProperty("交易状态，枚举值：\n" +
            "SUCCESS：支付成功\n" +
            "CLOSED：已关闭\n" +
            "ABNORMAL：退款异常，退款到银行发现用户的卡作废或者冻结了，导致原路退款银行卡失败，可前往【商户平台—>交易中心】，手动处理此笔退款")
    private String refund_status;

    @ApiModelProperty("分账方系统内部的分账/回退单号")
    private String out_order_no;

}
